﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Lamex.Common
{
    public static class DataTypeList
    {
        public static ComboxListEdit TypeList
        {

            get;
            set;

        }
        public enum ComboxListEdit
        {
            String,
            Decimal,
            Bool,
            Char,
            Byte,
            Sbyte,
            Short,
            Int,
            Long,
            Ushort,
            Unit,
            Ulong,
            Single,
            Double,
            Object
        }

        public static T ToDictEnum<T>(this string str) where T : struct
        {
            var type = typeof(T);
            if (!type.IsEnum)
            {
                
            }

            T ret;
            var b = Enum.TryParse<T>(str, out ret);
            if (!b)
            {
                
            }
            return ret;

        }
    }
}
